<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 管理系统大布局 - Layui</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/layui/css/layui.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">CMS管理系统</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="${pageContext.request.contextPath}/${user.img}" onerror="javascript:this.src='${pageContext.request.contextPath}/resources/img/default.jpg'" class="layui-nav-img">
                    ${user.username}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">设置</a></dd>
                    <dd><a href="">关注</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/login.go?service=loginout">登出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">基本信息管理</a>
                    <dl class="layui-nav-child">
                        <c:if test="${user.role == 1}">
                            <dd><a href="${pageContext.request.contextPath}/su.do?service=userList" target="viewBody">员工管理</a></dd>
                        </c:if>
                        <dd><a href="${pageContext.request.contextPath}/rot.do?route=customerList" target="viewBody">客户管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">用户设置</a>
                    <dl class="layui-nav-child">
                        <dd><a href="${pageContext.request.contextPath}/rot.do?route=updatePwd" target="viewBody">改密码</a></dd>
                        <dd><a href="${pageContext.request.contextPath}/rot.do?route=updateImg" target="viewBody">改头像</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="javascript:;">其他功能</a></li>
                <li class="layui-nav-item"><a href="">功能1</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body" style=" width: 100%;height: 100%">
        <!-- 内容主体区域 -->
        <div style="padding: 15px; width: 100%;height: 100%">
            <iframe name="viewBody" src="https://www.imooc.com/" frameborder="0" style=" width: 85%;height: 85%"></iframe>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        底部固定区域
    </div>
</div>

<script src="${pageContext.request.contextPath}/resources/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>
</body>
</html>
